home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10180 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  962 b 

  1. Path: news.luc.edu!user
  2. From: VArase@varase.it.luc.edu (Verne Arase)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: given: char foo[80]; there is no such thing as element foo[
  5. Date: Fri, 15 Mar 1996 16:41:31 -0600
  6. Organization: LUMC
  7. Message-ID: <AD6F4E3B9668B8092@mcdialb09.it.luc.edu>
  8. References: <3148DBB6.1353@hawaii.edu>
  9. NNTP-Posting-Host: 147.126.240.125
  10.  
  11. In article <3148DBB6.1353@hawaii.edu>,
  12. Dave Carien <davec@hawaii.edu> wrote:
  13.  
  14.  >Yes or no on this, I just recently got confused by two different books. I
  15.  
  16.  >assume that the declaration foo[80] allocates storage for elements 0-79. 
  17.  >A string could be terminated by doing something like foo[79] = '\0', but 
  18.  >foo[80] = '\0' would be invalid because such an element does not exist. 
  19.  >Just looking for confirmation that I'm right here. A simple Y or N will 
  20.  >do thanks.
  21.  
  22. Y :-).
  23.  
  24. Assigning a value to foo[80] _could_ result in a storage overlay.
  25.  
  26. ---
  27. The above are my own opinions, and not those of my employer.
  28.